﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <%@ include file="../common/header.jsp" %>
    <script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>

<div class="container " style="margin-top: 20px">
    <%@ include file="../common/top.jsp" %>

    <div class="row">
        <div class="col-sm-3">
            <c:set var="menu" value="customerTransfer"/>
            <%@ include file="../common/menu.jsp" %>
        </div>
        <div class="col-sm-9">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">移交历史查询</h1>
                </div>
            </div>
            <form class="form-inline" id="searchForm" action="/customerTransfer/list.do" method="post">
                <input type="hidden" name="currentPage" id="currentPage" value="1">
                <div class="form-group">
                    <label>关键字:</label>
                    <input type="text" class="form-control" name="keyword"
                           value="${qo.keyword}" placeholder="请输入客户姓名">
                </div>
                <div class="form-group">
                    <label>时间:</label>
                    <input class="form-control" name="beginDate" value="<fmt:formatDate value="${qo.beginDate}" pattern="yyyy-MM-dd"/>" placeholder="请输入开始时间" type="text" readonly> ~
                    <input class="form-control" name="endDate" value="<fmt:formatDate value="${qo.endDate}" pattern="yyyy-MM-dd"/>" placeholder="请输入结束时间" type="text" readonly>
                </div>
                
                <button type="submit" class="btn btn-primary">
                    <span class="glyphicon glyphicon-search"></span> 查询
                </button>
            </form>

            <table class="table table-striped table-hover">
                <tr>
                    <th>编号</th>
                    <th>客户姓名</th>
                    <th>操作时间</th>
                    <th>操作人</th>
                    <th>旧营销人员</th>
                    <th>新营销人员</th>
                    <th>移交原因</th>
                </tr>
                <c:forEach var="transfer" items="${pageInfo.list}" >
				 <tr>
					 <td>${transfer.id}</td>
					 <td>${transfer.customer.name}</td>
					 <td><fmt:formatDate value="${transfer.operateTime}" pattern="yyyy-MM-dd"/></td>
					 <td>${transfer.operator.name}</td>
					 <td>${transfer.oldSeller.name}</td>
					 <td>${transfer.newSeller.name}</td>
					 <td>${transfer.reason}</td>
					 
				 </tr>
				</c:forEach>
				 
            </table>

            <%@ include file="../common/page.jsp" %>
        </div>
    </div>
</div>

<script type="text/javascript">
$(function() {
	//日历插件
	$("#searchForm input[name='beginDate']").click(function() {
		WdatePicker({
			maxDate: new Date()
		});
	});
	$("#searchForm input[name='endDate']").click(function() {
		WdatePicker({
			minDate: $("#searchForm input[name='beginDate']").val(),
			maxDate: new Date()
		});
	});
});
</script>
</body>
</html>